package com.wxapp.custom.service.controller;

import com.wxapp.common.constant.base.IBaseController;
import com.wxapp.common.constant.pojo.vm.ResultVm;
import com.wxapp.custom.api.pojo.vm.address.PAddressDetailVm;
import com.wxapp.custom.service.service.AddressService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author lgl
 * @Description 地址管理
 * @Datetime 2023/10/9 14:11
 * @Modified By
 */
@RestController
@RequiredArgsConstructor
@RequestMapping("address")
@Tag(name = "地址管理")
public class AddressController extends IBaseController {
    private final AddressService addressService;

    @GetMapping("getDetail/{id}")
    @Operation(summary ="获取地址信息")
    public ResultVm<PAddressDetailVm> getDetail(@PathVariable String id) {
        return addressService.getDetail(id);
    }
}
